package neu.gprs.Action;

import neu.gprs.dto.LookOverPosStatusDto;
import neu.gprs.service.PosStatusService;

import com.opensymphony.xwork2.ActionSupport;

/**
 * @author zhu_hui
 */
public class UpdateAction extends ActionSupport {
    /**
     * SystemID
     */
    private static final long serialVersionUID = 1L;

    private PosStatusService posStatusService;
    private String sysBlackVer;
    private String sysParaVer;
    private String sysWhiteVer;
    private String sysSoftVer;
    private String ableFlag;
    private String psamCardNo;
    private String lineNo;
    private String cardNo;

    public String getSysBlackVer() {
        return sysBlackVer;
    }

    public void setSysBlackVer(String sysBlackVer) {
        this.sysBlackVer = sysBlackVer;
    }

    public String getSysParaVer() {
        return sysParaVer;
    }

    public void setSysParaVer(String sysParaVer) {
        this.sysParaVer = sysParaVer;
    }

    public String getSysWhiteVer() {
        return sysWhiteVer;
    }

    public void setSysWhiteVer(String sysWhiteVer) {
        this.sysWhiteVer = sysWhiteVer;
    }

    public String getSysSoftVer() {
        return sysSoftVer;
    }

    public void setSysSoftVer(String sysSoftVer) {
        this.sysSoftVer = sysSoftVer;
    }

    public String getAbleFlag() {
        return ableFlag;
    }

    public void setAbleFlag(String ableFlag) {
        this.ableFlag = ableFlag;
    }

    public String getPsamCardNo() {
        return psamCardNo;
    }

    public void setPsamCardNo(String psamCardNo) {
        this.psamCardNo = psamCardNo;
    }

    public void setPosStatusService(PosStatusService posStatusService) {
        this.posStatusService = posStatusService;
    }

    public String getLineNo() {
        return lineNo;
    }

    public void setLineNo(String lineNo) {
        this.lineNo = lineNo;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    /**
     * @return SUCCESS
     * @throws Exception
     */
    public String execute() throws Exception {
        LookOverPosStatusDto dto = new LookOverPosStatusDto();
        dto.setSysBlackVer(sysBlackVer);
        dto.setSysParaVer(sysParaVer);
        dto.setSysWhiteVer(sysWhiteVer);
        dto.setSysSoftVer(sysSoftVer);
        dto.setAbleFlag(ableFlag);
        dto.setLineNo(lineNo);
        dto.setCardNo(cardNo);
        posStatusService.update(dto);
        return SUCCESS;
    }
}
